#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2022/5/25 0:15
# @Author  : 刘广鸿
# @File    : confing.py
# @Software: PyCharm

class Config(object):
    DEBUG = False
    TESTING = False
    DBUSER = '0B2FBCCFDB476F7143AA0922570F5146'
    DBPASSWORD = '19172C8011FA29877B8F81417BFAA857'
    DBHOST = "localhost"
    DBNAME = "liugh"
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SECRET_KEY = 'secret key to protect from csrf'
    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{user}:{password}@{host}/{db}'.format(user=DBUSER, password=DBPASSWORD,
                                                                                     host=DBHOST,
                                                                                     db=DBNAME)


class ProductionConfig(Config):
    DEBUG = False
    SERVER_NAME = "liugh.cn"


class DevelopmentConfig(Config):
    DEBUG = True
    SERVER_NAME = "127.0.0.1:8000"


class TestingConfig(Config):
    TESTING = True
